#pragma once
#include <stdio.h>

#define MAX_NAME 20
#define MAX_SEX 5
#define MAX_TELE 12
#define MAX_ADDRESS 30

#define INITIAL_SZ 3
#define INC_SZ 2

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>

typedef struct PeoInfo
{
	char name[MAX_NAME];
	int age;
	char sex[MAX_SEX];
	char tele[MAX_TELE];
	char address[MAX_ADDRESS];

}PeoInfo;

//typedef struct Contact
//{
//	PeoInfo date[100];
//	int sz;
//}Contact;

typedef struct Contact
{
	PeoInfo* date;
	int sz;
	int capacity;
}Contact;

void InitContact(Contact* pc);
void AddContact(Contact* pc);
void ShowContact(const Contact* pc);
void DelContact(Contact* pc);
void SearchContact(const Contact* pc);
void ModifyContact(Contact* pc);
void SortContact_age(Contact* pc);
void DestroyContact(Contact* pc);
void SaveContact(Contact* pc);